<?php
/***********************************************************************
 * @package    	IvanEngine
 * @subpackage 	Core
 * @author     	Ivan <ivanzx@msn.com>
 * @created    	2010-05-17
 ***********************************************************************/
if(defined("IVANENGINE_CORE_VALIDATOR_EMAIL"))
	die("Redefinition macro in :".__FILE__."(".__LINE__.")");
define("IVANENGINE_CORE_VALIDATOR_EMAIL", true);

require_once (dirname(__FILE__).'/ValidatorRegex.php');

class CValidatorEMail extends CValidatorRegex 
{
	protected function Initialize($options = array(), $messages = array())
  	{
  		parent::Initialize($options, $messages);

    	$this->SetOption(self::NR_Pattern, '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i');
  	}
}

?>